<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../../../common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<sfa:mainTitle></sfa:mainTitle>
		<%@ include file="../../../common/meta.jsp"%>
		<link rel="stylesheet" href="${path }/css/jquery.autocomplete.css"
			type="text/css"></link>
		<script type="text/javascript"
			src="${path }/script/jquery.autocomplete.js">
</script>
		<script type="text/javascript">
function doQuery() {
	document.form1.action = "${path}/business/base/index/query";
	document.form1.submit();
}
function opendialog(obj1, obj2) {
	var dialog11 = art.dialog( {
		id : obj2,
		title : '保单详细信息'
	});
	$.ajax( {
		url : '${path}/business/base/index/policydetail?cid=' + obj1,
		success : function(data1) {
			dialog11.content(data1);
		},
		cache : false
	});
}

$(document).ready(function() {
	// 供应商
		var requestUrl = "${path}/common/index/getprovider";
		$.ajax( {
			type : "post",//默认为get   
			dataType : "json",
			url : requestUrl,
			success : function(providerList) {
				$("#pvdn").autocomplete(providerList, {
					minChars : 0,
					max : 200,
					width : 200,
					matchContains : "word",
					autoFill : true,
					formatItem : function(row, i, max) {
						return row.providercode + ":" + row.providerabbr;
					},
					formatMatch : function(row, i, max) {
						return row.providercode + ":" + row.providerabbr;
					},
					formatResult : function(row) {
						return row.providercode + ":" + row.providerabbr;
					}
				});
			}
		});
	});

$(function() {
	fixTable.FixTable("mytable");
	$("#fullScreen").click(function() {
		fullScreen.FullScreen("mylist");
	});
})
</script>
	</head>
	<body id="master">
		<sfa:mainHeader></sfa:mainHeader>
		<form action="" name="form1" method="post">
			<div class="webpart3 contentarea">
				<div class="webpart-head">
					<div class="webpart-head-item">
						保单查询
						<div class="tools-btn">
							<a href="####" id="fullScreen"><span> <img
										src="${path}/statics/images/qp.gif"
										style="margin-right: 4px; margin-bottom: -3px;" />全屏</span> </a>
						</div>
					</div>
				</div>
				<div class="webpart-main">
					<div class="webpart-main-item" style="padding-top: 12px;">
						<div class="search">
							<table width="100%" border="0" cellspacing="0" cellpadding="10"
								class="table_form">
								<tbody>
									<tr>
										<td align="right">
											<span style="color: red;">*</span>供应商：
										</td>
										<td>
											<input type="text" name="pvdn" id="pvdn" size="17"
												width="200" value="${pvdn}"></input>
										</td>
										<td align="right">
											营销员姓名：
										</td>
										<td>
											<input name="agtid" type="text" value="${agtid}" size="17" />
										</td>
										<td align="right">
											业务类型：
										</td>
										<td>
											<select name="chtype">
												<option value="A" ${!empty(channeltype)||channeltype=='A'?'selected':''}>
													代渠
												</option>
												<option value="B" ${!empty(channeltype)||channeltype=='B'?'selected':''}>
													银渠
												</option>
												<option value="Z" ${!empty(channeltype)||channeltype=='Z'?'selected':''}>
													综拓
												</option>
												<option value="G" ${!empty(channeltype)||channeltype=='G'?'selected':''}>
													多元
												</option>
											</select>
										</td>
									</tr>
									<tr>
										<td align="right">
											投保单号：
										</td>
										<td>
											<input name="appno" type="text" size="17" value="${appno }" />
										</td>
										<td align="right">
											受理开始日期：
										</td>
										<td>
											<input name="badate" id="badate" type="text"
												onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'eadate\',{d:-0});}'})"
												value="${badate }" size="17" />
										</td>
										<td align="right">
											受理结束日期：
										</td>
										<td>
											<input name="eadate" id="eadate" type="text"
												onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'badate\',{d:0});}'})"
												value="${eadate }" size="17" />
										</td>

									</tr>
									<tr>
										<td align="right">
											保单号码：
										</td>
										<td>
											<input name="conno" type="text" size="17" value="${conno}" />
										</td>
										<td align="right">
											被保人姓名：
										</td>
										<td>
											<input name="isname" type="text" value="${isname}" size="17" />
										</td>
										<td align="right">
											投保人姓名：
										</td>
										<td>
											<input name="cname" type="text" value="${cname }" size="17" />
										</td>
									</tr>
									<tr>
										<td align="right">
											投保人身份证号：
											<td>
												<input name="cid" type="text" value="${cid}" size="17" />
											</td>
											<td align="right">
												承保开始日期：
											</td>
											<td>
												<input name="bappdate" id="bappdate" type="text"
													onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'eappdate\',{d:-0});}'})"
													value="${bappdate}" size="17" />
											</td>
											<td align="right">
												承保结束日期：
											</td>
											<td>
												<input name="eappdate" id="eappdate" type="text"
													onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'bappdate\',{d:0});}'})"
													value="${eappdate}" size="17" />
											</td>
											<td></td>
									</tr>
									<tr>
										<td align="right">
											<span style="color: red;">*</span>保单状况：
										</td>
										<td colspan="4">
											<sfa:dic showType="select" kindNo="CONTRACTSTATUS"
												attr="class='selectbox'" name="cstatus" id="cstatus"
												code="${cstatus}">
											</sfa:dic>
										</td>
										<td align="center">
											<input name="Input" type="button" class="linkbtn2"
												value="查  询" onclick="doQuery()" />
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<!-- 查詢列表 -->
						<div id="mylist" style="height: 365px;" class="dlist">
							<table id="mytable" cellpadding="0" cellspacing="0"
								class="dg_borderstyle  trStyleTable"
								style="margin-top: 0px; text-align: center;">
								<tr>
									<th name="fixcol">
										<span>序号</span>
									</th>
									<th name="fixcol">
										<span>投保单号&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>保单号码&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>保单状态&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>所属省机构&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>受理日期&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th style="min-width: 80px;">
										<span>受理人&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>录入日期&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th style="min-width: 80px;">
										<span>录入人&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>承保日期&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>回单日期&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>缴费日期&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>生效日期&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>业务类型&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th style="min-width: 120px;">
										<span>供应商&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>投保人姓名&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th style="min-width: 60px;">
										<span>营销员&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>保费合计&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>代理费用&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>FYB&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th>
										<span>价保合计&nbsp;&nbsp;&nbsp;</span>
									</th>
									<th style="min-width: 100px;">
										<span>数据来源&nbsp;&nbsp;&nbsp;</span>
									</th>
								</tr>

								<c:forEach items="${pagination.resultList}" var="list"
									varStatus="ind">
									<tr>
										<td>
											${(pagination.page-1)*10+(ind.index+1)}
										</td>
										<td>
											<a href="#"
												onclick="opendialog('${list.CONTRACTID }','${list.APPLICATIONNO }')">${list.APPLICATIONNO}</a>
										</td>
										<td>
											${list.CONTRACTNO}
										</td>
										<td>
											${list.CONTRACTSTATUS}
										</td>
										<td>
											${list.BRANCHNAME}
										</td>
										<td>
											${list.ACCEPTDATE}
										</td>
										<td>
											${list.ACCEPTUSER}
										</td>
										<td>
											${list.APPLYDATE}
										</td>
										<td>
											${list.APPLYUSER}
										</td>
										<td>
											${list.APPROVEDATE}
										</td>
										<td>
											${list.POLICYRETURNDATE}
										</td>
										<td>
											${list.PAIDUPDATE}
										</td>
										<td>
											${list.EFFECTIVEDATE}
										</td>
										<td>
											${list.ASCRIPTIONMODE=='A'?'代渠':list.ASCRIPTIONMODE=='B'?'银渠':list.ASCRIPTIONMODE=='Z'?'综拓':list.ASCRIPTIONMODE=='G'?'多元':''}
										</td>
										<td>
											${list.PROVIDERNAME}</td> <td >${list.CUSTOMERNAME}
										</td>
										<td>
											${list.AGENTNAME}
										</td>
										<td>
											${list.INITIALPREMIUM}
										</td>
										<td>
											${list.AGENCYFEE}
										</td>
										<td>
											${list.FYB}
										</td>
										<td>
											${list.VALUEPREM}
										</td>
										<td>
											${list.DATASOURCE}
										</td>
									</tr>
								</c:forEach>
							</table>
						</div>
						<c:if test="${not empty pagination.multiPage}">
							<div class="dg_pagerstyle">
								<div class="pageinfo">
									第${pagination.page }页 | 共${pagination.totalPages
									}页/${pagination.totalRows }条记录
								</div>
								<div class="pagebtn">
									${pagination.multiPage}
								</div>
							</div>
						</c:if>
					</div>
				</div>
				<div class="webpart-foot">
					<div class="webpart-foot-item">
					</div>
				</div>
			</div>
		</form>
		<sfa:mainFooter></sfa:mainFooter>
	</body>
</html>
